package com.fhz.module_main.test

import java.util.concurrent.atomic.AtomicLong

/**
 * 时间:2023/4/21
 * @author Mr.Feng
 * 简述: TODO
 */

fun main(){

    val clzss = Class.forName("com.fhz.module_main.test.Haha")

//    val annotation = clzss.getAnnotation(MyAnnotation::class.java)

    val field = clzss.getDeclaredField("name")
    field.isAccessible = true
    val annotation = field.getAnnotation(MyAnnotation::class.java)
    println(annotation.value)


    val atomicInteger = AtomicLong()
    val andIncrement = atomicInteger.getAndIncrement()



    val constructor = clzss.getConstructor()
    val h = constructor.newInstance()
    println(h)

//    var a = Haha()

}